package priv.yiyuan.example.design.proxy;

/**
 * 用户服务实现
 * <p>
 * 真实主题
 *
 * @author YiYuan
 * @data 2025/9/24
 * @apoNote
 */
public class UserServiceImpl implements UserService {

    @Override
    public void registerUser(String username, String password) {

        System.out.println("开始执行用户注册业务逻辑: " + username);

        if (username != null && !username.isEmpty() && password != null && !password.isEmpty()) {
            System.out.println("用户 " + username + " 注册成功！");
        }
        else {
            System.out.println("用户注册失败: 用户名或密码不能为空。");
        }

        System.out.println("用户注册业务逻辑执行完毕。");

    }

}
